<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="">
			<select name="" id="cc">
				<option value="0">请选择大小</option>
				<option value ="1">大</option>
				<option value ="2">小</option>
			</select>
			<br>
			<br>
			<img src="./摇色子/1.jpg" id="imgb" ><br>
			<button type="button" onclick="ks()">开始</button>
		</div>
	</body>
	<script type="text/javascript">
		var aa=document.getElementById('cc')
		function ks(){
			if(aa.value='0'){
				alert('请选择大小！');
				return false;
			}
			
			var bb=setInterval(function(){
				var imgc=document.getElementById('imgb')
				var sz=["摇色子/1.jpg","摇色子/2.jpg","摇色子/3.jpg","摇色子/4.jpg","摇色子/5.jpg","摇色子/6.jpg"]
				var random=Math.floor(Math.random()*sz.length);
				imgc.src=sz[random];
			},300)
		}
		if(aa.value='1'||){
			
		}
	</script>
</html>
